<?php
/**
 * Created by PhpStorm.
 *
 * Author : Traveler.
 * Time   : 2020/2/12 18:24
 * Company: Inner Mongolia Zhengzhi Network Technology Co., Ltd
 */

namespace app\admin\validate;


use think\Validate;

class Icafe extends Validate
{
    /**
     * 当前验证规则
     * @var array
     */
    protected $rule = [
        'name'      => 'require',
        'contact'   => 'require',
        'cellphone' => 'require|mobile',
        'cate_id'   => 'require',
        'address'   => 'require',
    ];

    /**
     * 验证提示信息
     * @var array
     */
    protected $message = [
        'name' => [
            'require' => '场所名称不能为空',
        ],
        'contact' => [
            'require' => '联系人不能为空',
        ],
        'cellphone' => [
            'require' => '联系电话不能为空',
            'mobile'  => '联系电话格式错误',
        ],
        'cate_id' => [
            'require' => '场所分类不能为空',
        ],
        'address' => [
            'require' => '详细地址不能为空',
        ],
    ];
}